import java.net.PortUnreachableException;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-06-04
 * Time: 23:32
 */
public class Employee {
    String name;
    String number;
    int wages;
    double wagesAdd;

    public Employee(){

    };

    public Employee(String name, String number,int wages){
        this.name=name;
        this.number=number;
        this.wages=wages;
        this.wagesAdd=wages*0.05;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "姓名='" + name + '\'' +
                ", 编号='" + number + '\'' +
                ", 基本薪水=" + wages +
                ", 薪水增长额=" + wagesAdd +
                '}';
    }

    public void getTotalWages(){
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入增长年份");
        int n=scan.nextInt();
        double x=this.wages+n*wagesAdd;
        System.out.println(n+"年后的工资为"+x);
    }
}
